package edu.ncsu.csc.itrust.dao.labprocedure;

import java.util.List;
import edu.ncsu.csc.itrust.action.AddHCPAction;
import edu.ncsu.csc.itrust.action.EditOfficeVisitAction;
import edu.ncsu.csc.itrust.beans.LabTechProcedureBean;
import edu.ncsu.csc.itrust.beans.PersonnelBean;
import edu.ncsu.csc.itrust.dao.DAOFactory;
import edu.ncsu.csc.itrust.datagenerators.TestDataGenerator;
import edu.ncsu.csc.itrust.enums.Role;
import edu.ncsu.csc.itrust.testutils.TestDAOFactory;
import junit.framework.TestCase;

public class GetAllLabTechsList extends TestCase {

	public void setUp() throws Exception{
		TestDataGenerator gen = new TestDataGenerator();
		gen.clearAllTables();
		gen.standardData();
		
		PersonnelBean p = new PersonnelBean();
		p.setFirstName("Lab");
		p.setLastName("Tech");
		p.setSpecialty("general");
		p.setRole(Role.LT);
		p.setEmail("ltech@email.com");
		
		new AddHCPAction(TestDAOFactory.getTestInstance(), 1).add(p);		
	}
	
	public void testGetList() throws Exception{
		EditOfficeVisitAction act = new EditOfficeVisitAction(TestDAOFactory.getTestInstance(), 1, "1", "11" );
		List<LabTechProcedureBean> tech = act.getAllLabTechs();
		assertEquals(1, tech.size() );
	}
}
